﻿using System;
using System.Collections.Generic;

namespace SmartCommunity.Models;

/// <summary>
/// 楼宇
/// </summary>
public partial class BuildingEntity
{
    /// <summary>
    /// 楼宇Id
    /// </summary>
    public Guid BuildingId { get; set; }

    /// <summary>
    /// 小区ID
    /// </summary>
    public Guid AreaId { get; set; }

    /// <summary>
    /// 上级id
    /// </summary>
    public Guid? ParentId { get; set; }

    /// <summary>
    /// 楼宇编号
    /// </summary>
    public string BuildingNo { get; set; } = null!;

    /// <summary>
    /// 楼宇名称
    /// </summary>
    public string BuildingName { get; set; } = null!;

    /// <summary>
    /// 楼宇类型：楼栋1，单元楼2
    /// </summary>
    public int BuildingLevel { get; set; }

    /// <summary>
    /// 建筑类型
    /// </summary>
    public int BuildingType { get; set; }

    /// <summary>
    /// 楼宇用途
    /// </summary>
    public int BuildingUsage { get; set; }

    /// <summary>
    /// 楼宇朝向
    /// </summary>
    public int BuildingDirection { get; set; }

    /// <summary>
    /// 层数
    /// </summary>
    public int Floor { get; set; }

    /// <summary>
    /// 备注说明
    /// </summary>
    public string? Remark { get; set; }

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreatedBy { get; set; } = null!;

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime CreatedTime { get; set; }

    /// <summary>
    /// 修改人
    /// </summary>
    public string UpdatedBy { get; set; } = null!;

    /// <summary>
    /// 修改时间
    /// </summary>
    public DateTime UpdatedTime { get; set; }

    public virtual AreaEntity Area { get; set; } = null!;

    public virtual ICollection<BuildingEntity> Children { get; set; } = new List<BuildingEntity>();

    public virtual BuildingEntity? Parent { get; set; }

    public virtual ICollection<RoomEntity> Rooms { get; set; } = new List<RoomEntity>();
}
